﻿using System.Text;

namespace Wechat.Results
{
    /// <summary>
    /// 语音回复
    /// </summary>
    public class WechatVoiceResult : WechatResult
    {
        public WechatVoiceResult(string toUsername, string fromUsername)
            : base(toUsername, fromUsername)
        {

        }

        public string MediaId { get; set; }

        protected override void Format(StringBuilder builder)
        {
            builder.Append("<MsgType><![CDATA[voice]]></MsgType>");

            builder.AppendFormat("<Voice><MediaId><![CDATA[{0}]]></MediaId></Voice>", MediaId);
        }
    }
}
